-- MyARM common types, constants and components
-- my-arm processor ALU
-- Oleg Gavrilchenko
-- reffum@bk.ru

library ieee;
use ieee.std_logic_1164.all;

package common is
   -------------------------------------------------------------------    
   -- Types
   ------------------------------------------------------------------- 
   -- ALU functions    
   type alu_functions is (
      alu_and, 
      alu_andn, 
      alu_xor, 
      alu_addc, 
      alu_addnc, 
      alu_naddc,
      alu_a,
      alu_or,
      alu_b,
      alu_nb,
      alu_0);
      
   -- ARM status flags 
   type status_flags is record
      c : std_logic; -- Carry
      v : std_logic; -- Overflow
      n : std_logic; -- Negativ
      z : std_logic; -- Zero
   end record ;
      
   
   
   -------------------------------------------------------------------    
   -- Constants
   -------------------------------------------------------------------    
   constant C_BUS_WIDTH : integer := 32;
   
end common;